﻿using TripleA.Core.Extensions.Process;
using TripleA.Core.Interfaces.Entities;
using TripleA.StoryQ;

namespace TripleA.Tests.Process
{
    public class ProcessDomain : StoryQTestDomain<Context>
    {
        private string _exeName;

        public void TheExeNamed_(string name)
        {
            _exeName = name;
        }

        public void TheExeIsLaunched()
        {
            SafeExecute(() => TripleA.RunProcess(_exeName));
        }

        public void TheExeShouldBeRunning()
        {
            TripleA.IsExeRunning(_exeName);
        }

        public void TheExeShouldNotBeRunning()
        {
            TripleA.IsExeRunning(_exeName, false);
        }
    }
}